struct MyStruct {
    public var a: Int16;

    public function myMethod() {
        printf("a = %i\n", this.a);
    }
}

function staticExtension(m: MyStruct, i: Int) {
    printf("static extension called with %i and %i\n", m.a, i);
}

function main() {
    var s1 = struct MyStruct {a: 1};
    s1.myMethod();
    var s2 = struct MyStruct {a: 2};
    MyStruct.myMethod(s2);
    var s3 = struct MyStruct {a: 3};
    using implicit s3 {
        MyStruct.myMethod();
    }

    staticExtension(s1, 5);
    s2.staticExtension(6);
}
